package com.example.mybatisdemo.dao;

import com.example.mybatisdemo.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-08-11
 * Time: 17:29
 */

    @Mapper
    public interface UserMapper {
        public List<User> getAll();
        Integer add(User user);
        Integer update(Integer id,String name);
        Integer delById(Integer id);
         @Select(" select * from stu where id=#{id}")
         User getUserById(Integer id);
         Integer insert(User user );

        List<User> selectByCondition(User user);

        int updateById(User user);
        int deleteByIds(List<Integer> ids);
    }

